Skip to content

Bump to log4j-slf4j2-impl v2.25.0 #1269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

christolis
Copy link
Member

Throughout this entire time, for anybody cloning the repository, setting up the config.json.template, following all the steps from the GitHub wiki we have verbatim and running the bot, leads to a SLF4J(E) stacktrace into the console almost as soon as the program begins execution, regardless of the environment:

SLF4J(E): Unexpected problem occurred during version sanity check
SLF4J(E): Reported exception:
java.lang.AbstractMethodError: Receiver class org.apache.logging.slf4j.SLF4JServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:385)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:189)
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:511)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:497)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:446)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:472)
at org.togetherjava.tjbot.Application.<clinit>(Application.java:35)

There has been no major hurdle noted after this exception being thrown, at least not one that I am personally aware of.

Fix this by updating log4j-slf4j2-impl to the latest stable version as of writing this (2.25.0). As a result, the stacktrace is entirely gone and logging appears to be behaving normally.

By doing this we also prevent discouraging novice contributors from contributing by falsely getting them to believe that they have performed something wrong during setup.

Throughout this entire time, for anybody cloning the repository, setting
up the `config.json.template`, following all the steps from the GitHub
wiki we have verbatim and running the bot, leads to a SLF4J(E)
stacktrace into the console almost as soon as the program begins
execution, regardless of the environment:

    SLF4J(E): Unexpected problem occurred during version sanity check
    SLF4J(E): Reported exception:
    java.lang.AbstractMethodError: Receiver class org.apache.logging.slf4j.SLF4JServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
	at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:385)
	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:189)
	at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:511)
	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:497)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:446)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:472)
	at org.togetherjava.tjbot.Application.<clinit>(Application.java:35)

There has been no major hurdle noted after this exception being thrown,
at least not one that I am personally aware of.

Fix this by updating `log4j-slf4j2-impl` to the latest stable version as
of writing this (2.25.0). As a result, the stacktrace is entirely gone
and logging appears to be behaving normally.

By doing this we also prevent discouraging novice contributors from
contributing by falsely getting them to believe that they have performed
something wrong during setup.

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
@christolis christolis requested a review from a team as a code owner June 30, 2025 08:01
@SquidXTV
Copy link
Member

hm why doesn't dependabot trigger this version bump in the first place?

@christolis
Copy link
Member Author

Good question. I wondered the same thing. I suspect it comes from a misconfiguration in .github/dependabot.yml. I will look into the reason it did not trigger a Log4J bump request.

@Zabuzard Zabuzard added enhancement New feature or request dependencies Pull requests that update a dependency file and removed enhancement New feature or request labels Jun 30, 2025
@Zabuzard Zabuzard merged commit d2eb7ef into Together-Java:develop Jun 30, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants